<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>文件上传</title>
    <style type="text/css">
    html,body{margin:0;padding:0;width:{$Width}px;height:{$Height}px;}
	.uploadpic{position:relative;}
	#ImgPr{border:0;}
	.puloadpic{position:absolute;width:{$Width}px;height:{$Height}px;}
	.inputfile{position:absolute;top:0px;left:0px;z-index:100;-moz-opacity:0.3;opacity:0.3;filter: alpha(opacity=30);background:#4f99c6;cursor:pointer;}
	#uploadicon{font-size:200px;overflow:hidden;display:block;width:{$Width}px;height:{$Height}px;-moz-opacity:0.0;opacity:0.0;filter: alpha(opacity=0);cursor:pointer;}
	.uploadtext{position:absolute;top:0px;left:0px;z-index:50;color:red;font-weight:bold;text-align:center;width:{$Width}px;height:{$Height}px;line-height:{$Height}px;cursor:pointer;overflow:hidden;}
	</style>
	<!--[if !IE]> -->
	<script type="text/javascript">
		window.jQuery || document.write("<script src='__PUBLIC__/static/js/jquery.min.js'>"+"<"+"/script>");
	</script>
	<!-- <![endif]-->
	<!--[if IE]>
	<script type="text/javascript">
		window.jQuery || document.write("<script src='__PUBLIC__/static/js/jquery1x.js'>"+"<"+"/script>");
	</script>
	<![endif]-->
	<script type="text/javascript">
		if('ontouchstart' in document.documentElement) document.write("<script src='__PUBLIC__/static/js/jquery.mobile.custom.js'>"+"<"+"/script>");
	</script>
</head>

<body>
    <form enctype="multipart/form-data" id="PostMe" action="?" method="post" name="upform">
        <input type="hidden" value="{$Width}" name="Width">
        <input type="hidden" value="{$Height}" name="Height">
        <input type="hidden" value="{$BackCall}" name="BackCall">
        <div class="uploadpic">
        <if condition="$Files eq ''">
        	
			<img id="ImgPr" src="__PUBLIC__/manage/images/nopic.gif"  width="{$Width}" height="{$Height}">
			<div class="uploadtext">上传</div>
				<div class="inputfile" title="点击上传文件">
					<input type="file" name="file" id="uploadicon" value="upload"/>
				</div>
			</div>
			
		<else />
		
			<img id="ImgPr" src="__PUBLIC__/manage/images/pdfveiw.png"  width="{$Width}" height="{$Height}">
			<div class="uploadtext">更换</div>
				<div class="inputfile" title="点击上传文件">
					<input type="file" name="file" id="uploadicon" value="upload"/>
				</div>
			</div>
			
        </if>
			
		
		
    </form>
    <script type="text/javascript">
			$('#uploadicon').on("change",function(){
				$('#PostMe').submit();
				alert('文件正在上传中，稍后在点提交！');
			})

			$('#{$BackCall}',parent.document).val("{$Files}");

    </script>
</body>

</html>